//
//  ToolsTests.swift
//  HeadlineNewsTests
//
//  Created by han on 2019/6/5.
//  Copyright © 2019 han. All rights reserved.
//

import XCTest
@testable import HeadlineNews

class ToolsTests: XCTestCase {

    let timeout: TimeInterval = 5
    override func setUp() {
        
    }
    
    override func tearDown() {
        
    }
    
    func testNotification() {
//        // 异步测试
//        let expectation = self.expectation(description: "time up")
//        // 执行异步任务
//        DispatchQueue.background.after(3) {
//            // 3秒后发送通知
//            NotificationCenter.default.post(name: Notification.Name.NetTask.DidResume, object: nil, userInfo:[Notification.NetKey.Task: "task"] )
//            expectation.fulfill()
//        }
//
//        // 接收到通知后处理
//        self.expectation(forNotification: Notification.Name.NetTask.DidResume, object: nil) { (notification) -> Bool in
//            print(notification.userInfo ?? "")
//            return true
//        }
//        // 超时处理
//        waitForExpectations(timeout: timeout, handler: nil)
//        XCTAssert(true)
    }
    
    func testQueue() {
//        let underlyingQueue = DispatchQueue(label: "underlyingQueue")
//        let queue = OperationQueue(underlyingQueue: underlyingQueue, name: "delegateQueue")
        
    }
    
    func testTimeHandler() {

        
        
    }
}
